package com.publishproject.test;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.jungly.gridpasswordview.GridPasswordView;
import com.publishproject.R;

public class GridPasswordActivity extends AppCompatActivity {

    private GridPasswordView password;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_grid_password);
        password = (GridPasswordView)findViewById(R.id.password);
        password.setOnPasswordChangedListener(new GridPasswordView.OnPasswordChangedListener() {
            @Override
            public void onTextChanged(String psw) {

            }

            @Override
            public void onInputFinish(String psw) {
                ((TextView) findViewById(R.id.textView)).setText(psw);
            }
        });
    }

    public void click(View view){
        password.clearPassword();
    }
}
